import React, { useState } from 'react'

export default function A006_form() {

    let [inp1Val, setInp1Val] = useState('')
    let [inp2Val, setInp2Val] = useState('')

    let getVal = () => {
        console.log(inp1Val, inp2Val);
    }

    let getVal1 = (ev) => {
        setInp1Val(ev.target.value)

    }
    let getVal2 = (ev) => {
        setInp2Val(ev.target.value)
    }

    return (<div>
        <input type="text" value={inp1Val} name='name' onChange={ev => getVal1(ev)} />


        <input type="text" value={inp2Val} name='sex' onChange={ev => getVal2(ev)} />

        <button onClick={() => { getVal() }}>按钮</button>
    </div>)
}



